﻿<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" xmlns:System="clr-namespace:System;assembly=mscorlib" mc:Ignorable="d" 
             x:Class="Cartoons.App"
             >
    <Application.Resources>        
    	<Style x:Key="ButtonMetro" TargetType="Button">
    		<Setter Property="Background" Value="#FF1F3B53"/>
    		<Setter Property="Foreground" Value="White"/>
    		<Setter Property="Padding" Value="5"/>
    		<Setter Property="BorderThickness" Value="0"/>
    		<Setter Property="BorderBrush">
    			<Setter.Value>
    				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
    					<GradientStop Color="#FFA3AEB9" Offset="0"/>
    					<GradientStop Color="#FF8399A9" Offset="0.375"/>
    					<GradientStop Color="#FF718597" Offset="0.375"/>
    					<GradientStop Color="#FF617584" Offset="1"/>
    				</LinearGradientBrush>
    			</Setter.Value>
    		</Setter>
    		<Setter Property="Template">
    			<Setter.Value>
    				<ControlTemplate TargetType="Button">
    					<Grid>
    						<VisualStateManager.VisualStateGroups>
    							<VisualStateGroup x:Name="CommonStates">
    								<VisualState x:Name="Normal"/>
    								<VisualState x:Name="MouseOver">
    									<Storyboard>
    										<ColorAnimation Duration="0" To="#FF454545" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" Storyboard.TargetName="Background" d:IsOptimized="True"/>
    									</Storyboard>
    								</VisualState>
    								<VisualState x:Name="Pressed">
    									<Storyboard>
    										<ColorAnimation Duration="0" To="#FF505050" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" Storyboard.TargetName="Background"/>
    									</Storyboard>
    								</VisualState>
    								<VisualState x:Name="Disabled">
    									<Storyboard>
    										<DoubleAnimation Duration="0" To=".55" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledVisualElement"/>
    									</Storyboard>
    								</VisualState>
    							</VisualStateGroup>
    							<VisualStateGroup x:Name="FocusStates">
    								<VisualState x:Name="Focused">
    									<Storyboard>
    										<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualElement"/>
    									</Storyboard>
    								</VisualState>
    								<VisualState x:Name="Unfocused"/>
    							</VisualStateGroup>
    						</VisualStateManager.VisualStateGroups>
    						<Border x:Name="Background" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="Black" CornerRadius="7,0,7,7"/>
    						<ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
    						<Rectangle x:Name="DisabledVisualElement" Fill="#FFFFFFFF" IsHitTestVisible="false" Opacity="0" RadiusY="3" RadiusX="3"/>
    						<Border x:Name="FocusVisualElement" IsHitTestVisible="false" Margin="1" Opacity="0" CornerRadius="6,0,6,6" BorderBrush="#FF959595" BorderThickness="1"/>
    					</Grid>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    		<Setter Property="Margin" Value="5,0,5,5"/>
    	</Style>
    	<Style x:Key="ButtonClose" TargetType="Button">
    		<Setter Property="Background" Value="#FF1F3B53"/>
    		<Setter Property="Foreground" Value="#FF000000"/>
    		<Setter Property="Padding" Value="3"/>
    		<Setter Property="BorderThickness" Value="1"/>
    		<Setter Property="BorderBrush">
    			<Setter.Value>
    				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
    					<GradientStop Color="#FFA3AEB9" Offset="0"/>
    					<GradientStop Color="#FF8399A9" Offset="0.375"/>
    					<GradientStop Color="#FF718597" Offset="0.375"/>
    					<GradientStop Color="#FF617584" Offset="1"/>
    				</LinearGradientBrush>
    			</Setter.Value>
    		</Setter>
    		<Setter Property="Template">
    			<Setter.Value>
    				<ControlTemplate TargetType="Button">
    					<Grid>
    						<VisualStateManager.VisualStateGroups>
    							<VisualStateGroup x:Name="CommonStates">
    								<VisualState x:Name="Normal"/>
    								<VisualState x:Name="MouseOver">
    									<Storyboard>
    										<ColorAnimation Duration="0" To="#FF818181" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="Close" d:IsOptimized="True"/>
    									</Storyboard>
    								</VisualState>
    								<VisualState x:Name="Pressed">
    									<Storyboard>
    										<ColorAnimation Duration="0" To="#FF7C7C7C" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="Close" d:IsOptimized="True"/>
    									</Storyboard>
    								</VisualState>
    								<VisualState x:Name="Disabled">
    									<Storyboard>
    										<DoubleAnimation Duration="0" To=".55" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledVisualElement"/>
    									</Storyboard>
    								</VisualState>
    							</VisualStateGroup>
    							<VisualStateGroup x:Name="FocusStates">
    								<VisualState x:Name="Focused"/>
    								<VisualState x:Name="Unfocused"/>
    							</VisualStateGroup>
    						</VisualStateManager.VisualStateGroups>
    						<Border x:Name="Background" Background="Transparent">
    							<Path x:Name="Close" Stretch="Fill" Fill="Black" Data="F1 M 1007.93,7.10083L 1010.76,9.92896L 1013.59,7.10059C 1014.37,6.31958 1015.63,6.31952 1016.41,7.10059C 1017.19,7.88165 1017.19,9.14801 1016.41,9.92902L 1013.59,12.7574L 1016.41,15.5862C 1017.19,16.3672 1017.19,17.6335 1016.41,18.4146C 1015.63,19.1956 1014.37,19.1956 1013.59,18.4146L 1010.76,15.5858L 1007.93,18.4143C 1007.15,19.1953 1005.88,19.1954 1005.1,18.4143C 1004.32,17.6332 1004.32,16.3669 1005.1,15.5859L 1007.93,12.7573L 1005.1,9.9292C 1004.32,9.14819 1004.32,7.8819 1005.1,7.10089C 1005.88,6.31989 1007.15,6.31982 1007.93,7.10083 Z " UseLayoutRounding="False"/>
    						</Border>
    						<Rectangle x:Name="DisabledVisualElement" Fill="#FFFFFFFF" IsHitTestVisible="false" Opacity="0" RadiusY="3" RadiusX="3"/>
    					</Grid>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    		<Setter Property="Width" Value="12"/>
    		<Setter Property="Height" Value="12"/>
    		<Setter Property="Margin" Value="0,5,5,0"/>
    	</Style>
    	<Style x:Key="BorderWindow" TargetType="Border">
    		<Setter Property="Effect">
    			<Setter.Value>
    				<DropShadowEffect Opacity="0.25" BlurRadius="3" ShadowDepth="3"/>
    			</Setter.Value>
    		</Setter>
    		<Setter Property="Background" Value="#CCFFFFFF"/>
    		<Setter Property="CornerRadius" Value="0,7,7,7"/>
    		<Setter Property="Margin" Value="5,0,0,0"/>
    	</Style>
    	<Style TargetType="TextBox">
    		<Setter Property="BorderBrush" Value="#FF4E4E4E"/>
    		<Setter Property="Background">
    			<Setter.Value>
    				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
    					<GradientStop Color="#FFDEDEDE" Offset="0"/>
    					<GradientStop Color="White" Offset="0.387"/>
    				</LinearGradientBrush>
    			</Setter.Value>
    		</Setter>
    		<Setter Property="MinWidth" Value="100"/>
    		<Setter Property="Margin" Value="0,3"/>
    	</Style>
    	<ControlTemplate x:Key="CommonValidationToolTipTemplate" TargetType="ToolTip">
    		<Grid x:Name="Root" Margin="5,0" Opacity="0" RenderTransformOrigin="0,0">
    			<Grid.RenderTransform>
    				<TranslateTransform x:Name="Translation" X="-25"/>
    			</Grid.RenderTransform>
    			<VisualStateManager.VisualStateGroups>
    				<VisualStateGroup x:Name="OpenStates">
    					<VisualStateGroup.Transitions>
    						<VisualTransition GeneratedDuration="0"/>
    						<VisualTransition GeneratedDuration="0:0:0.2" To="Open">
    							<Storyboard>
    								<DoubleAnimation Duration="0:0:0.2" To="0" Storyboard.TargetProperty="X" Storyboard.TargetName="Translation">
    									<DoubleAnimation.EasingFunction>
    										<BackEase Amplitude=".3" EasingMode="EaseOut"/>
    									</DoubleAnimation.EasingFunction>
    								</DoubleAnimation>
    								<DoubleAnimation Duration="0:0:0.2" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root"/>
    							</Storyboard>
    						</VisualTransition>
    					</VisualStateGroup.Transitions>
    					<VisualState x:Name="Closed">
    						<Storyboard>
    							<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root"/>
    						</Storyboard>
    					</VisualState>
    					<VisualState x:Name="Open">
    						<Storyboard>
    							<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="X" Storyboard.TargetName="Translation"/>
    							<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root"/>
    						</Storyboard>
    					</VisualState>
    				</VisualStateGroup>
    			</VisualStateManager.VisualStateGroups>
    			<Border Background="#052A2E31" CornerRadius="5" Margin="4,4,-4,-4"/>
    			<Border Background="#152A2E31" CornerRadius="4" Margin="3,3,-3,-3"/>
    			<Border Background="#252A2E31" CornerRadius="3" Margin="2,2,-2,-2"/>
    			<Border Background="#352A2E31" CornerRadius="2" Margin="1,1,-1,-1"/>
    			<Border Background="#FFDC000C" CornerRadius="2">
    				<TextBlock Foreground="White" MaxWidth="250" Margin="8,4,8,4" TextWrapping="Wrap" Text="{Binding (Validation.Errors)[0].ErrorContent}" UseLayoutRounding="false"/>
    			</Border>
    		</Grid>
    	</ControlTemplate>
    </Application.Resources>
</Application>
